package com.yiji.fintech.musfinance.common.strategy.enginerules;

import com.yiji.fintech.musfinance.common.domain.base.BaseDomain;
import com.yiji.fintech.musfinance.common.domain.channel.ChannelDomain;
import com.yiji.fintech.musfinance.common.strategy.context.Context2DomainContext;
import com.yiji.fintech.musfinance.common.strategy.converter.Context2DepositDomainStrategy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 充值规则策略
 * Created by ouwen@yiji.com} on 2017/10/10.
 */
@Service
public class DepositRulesStrategy extends RulesStrategy {
    @Autowired
    private Context2DepositDomainStrategy depositDomainStrategy;

    @Override
    protected void process(ChannelDomain domain) {
        super.process(domain);
    }
    @Override
    protected void converter(ChannelDomain channelDomain, BaseDomain domain) {
        Context2DomainContext context2DomainContext = new Context2DomainContext(depositDomainStrategy);
        context2DomainContext.doConverter(channelDomain, domain);
    }
}
